#import <UIKit/UIKit.h>
#import "BaseUIViewController.h"

@protocol LVCUserStateDelegate;
@class LVCUserStateLogin;
@class LVCUserStateLogout;
@class LVCUserStateBase;
@protocol LVCSelectDelegate;
@class LVCSelectBase;

@interface MenuViewController : BaseUIViewController
{
    IBOutlet UIButton *btnJoke;
    IBOutlet UIButton *textJoke;
    IBOutlet UIButton *iconJoke;
    
    IBOutlet UIButton *btnTopic;
    IBOutlet UIButton *textTopic;
    IBOutlet UIButton *iconTopic;
    
    IBOutlet UIButton *btnJudge;
    IBOutlet UIButton *textJudge;
    IBOutlet UIButton *iconJudge;
    
    IBOutlet UIButton *btnPost;
    IBOutlet UIButton *textPost;
    IBOutlet UIButton *iconPost;
}

@property (retain, nonatomic) LVCUserStateLogin             *userStateLogin;
@property (retain, nonatomic) LVCUserStateLogout            *userStateLogout;
@property (retain, nonatomic) LVCUserStateBase              *currentUserState;
@property (retain, nonatomic) LVCSelectBase              *selectJoke;
@property (retain, nonatomic) LVCSelectBase              *selectTopic;
@property (retain, nonatomic) LVCSelectBase              *selectJudge;
@property (retain, nonatomic) LVCSelectBase              *selectPost;
@property (retain, nonatomic) LVCSelectBase              *currentSelect;
@property (retain, nonatomic) IBOutlet UIButton             *loginNlogoutBtn;

- (IBAction)goJoke:(id)sender;
- (IBAction)goTopic:(id)sender;
- (IBAction)goJudge:(id)sender;
- (IBAction)goPost:(id)sender;
- (IBAction)goSetting:(id)sender;
- (IBAction)loginNlogout:(id)sender;
- (IBAction)touchJoke:(id)sender;
- (IBAction)touchTopic:(id)sender;
- (IBAction)touchJudge:(id)sender;
- (IBAction)touchPost:(id)sender;

- (IBAction)leaveJoke:(id)sender;
- (IBAction)leaveTopic:(id)sender;
- (IBAction)leaveJudge:(id)sender;
- (IBAction)leavePost:(id)sender;

- (void)setUserState:(LVCUserStateBase *)newState;
- (void)setSelect:(LVCSelectBase *)newSelect;

@end

#pragma mark ---------当前选项状态机-----
@protocol LVCSelectDelegate<NSObject>
@optional
-(void)LVCSstart;
-(void)LVCSstop;
@end

@interface LVCSelectBase : NSObject<LVCSelectDelegate>
{
    UIButton *btn;
    UIButton *icon;
    UIButton *text;
}
-(id)init:(UIButton *)pBtn :(UIButton *)pIcon :(UIButton *)pText;
@end


#pragma mark ---------用户是否登录的状态机-----
@protocol LVCUserStateDelegate<NSObject>
@optional
-(void)LVCstart;
-(void)LVCclick;
@end

@interface LVCUserStateBase : NSObject<LVCUserStateDelegate>
{
    MenuViewController *owner;
}
-(id)init:(MenuViewController *)pOwner;
@end

@interface LVCUserStateLogin : LVCUserStateBase
@end

@interface LVCUserStateLogout : LVCUserStateBase
@end
